package com.maimang.platform.crm.entity;

import com.maimang.platform.annotation.Excel;
import com.maimang.platform.base.BaseEntity;
import com.maimang.platform.lang.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;


/**
 * @author Rocky
 * @version 1.0.0
 * @classname CrmCustomer
 * @description <br>客户清单表对应实体类</br>
 * @date 2019-10-07 09:43:10
 * @email jintaozhao@qq.com
 */
public class CrmCustomer extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/**
	 * 客户id
	 */
	@Id
	@GeneratedValue(generator = "JDBC")
	private Integer customerId;

	/**
	 * 删除标志（0代表存在 1代表删除）
	 */
	@Excel(name = "是否已删除")
	private String delFlag;
	/**
	 * 部门名称
	 */
	@Excel(name = "部门名称")
	private String deptName;
	@Transient
	private Long deptId;

	/**
	 * 员工工号
	 */
	// @Excel(name = "员工工号")
	private String jobNumber;
	/**
	 * 销售
	 */
	@Excel(name = "销售")
	private String userName;
	/**
	 * 行业
	 */
	@Excel(name = "行业")
	private String industry;
	/**
	 * 销售区域
	 */
	@Excel(name = "销售区域")
	private String salesArea;
	/**
	 * 集团名称
	 */
	@Excel(name = "集团名称")
	private String groupName;
	/**
	 * 公司名称
	 */
	@Excel(name = "公司名称")
	private String companyName;
	/**
	 * 联系人
	 */
	@Excel(name = "联系人")
	private String contactUser;
	/**
	 * 联系电话
	 */
	@Excel(name = "联系电话")
	private String contactPhone;
	/**
	 * 是否新客户(0 老客户 1新客户)
	 */
	@Excel(name = "是否新客户")
	private String isNew;
	/**
	 * 是否已合作(0 未合作 1已合作)
	 */
	@Excel(name = "是否已合作")
	private String isCooperated;
	/**
	 * 平台广告主名称
	 */
	@Excel(name = "平台广告主名称")
	private String advertiserName;
	/**
	 * 广告主数量
	 */
	@Excel(name = "广告主数量")
	private Integer advertiserNum;
	/**
	 * 注册日期
	 */
	@Excel(name = "注册日期")
	private Date registerDate;
	/**
	 * 项目地
	 */
	@Excel(name = "项目地")
	private String projectLocation;
	/**
	 * 项目名称
	 */
	@Excel(name = "项目名称")
	private String projectName;
	/**
	 * 内容
	 */
	@Excel(name = "内容")
	private String content;
	/**
	 * 消耗总额(单位：元)
	 */
	@Excel(name = "消耗总额(单位：元)")
	private String totalConsume;
	/**
	 * 合同总额(单位：元)
	 */
	@Excel(name = "合同总额(单位：元)")
	private String totalContract;
	/**
	 * 备注
	 */
	@Excel(name = "备注")
	private String remark;

	public Long getDeptId() {
		return deptId;
	}

	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public Integer getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getJobNumber() {
		return jobNumber;
	}

	public void setJobNumber(String jobNumber) {
		this.jobNumber = jobNumber;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getIndustry() {
		return industry;
	}

	public void setIndustry(String industry) {
		this.industry = industry;
	}

	public String getSalesArea() {
		return salesArea;
	}

	public void setSalesArea(String salesArea) {
		this.salesArea = salesArea;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getContactUser() {
		return contactUser;
	}

	public void setContactUser(String contactUser) {
		this.contactUser = contactUser;
	}

	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	public String getIsNew() {
		return isNew;
	}

	public void setIsNew(String isNew) {
		this.isNew = isNew;
	}

	/**
	 * 设置分组的key，这里就是把你想要分组的key拼起来
	 *
	 * @return groupKey
	 */
	public String groupKey() {
		if (StringUtils.isEmpty(isNew))
			return "new";
		return isNew.equalsIgnoreCase("新客户") ? "new" : "old";
	}

	public String getIsCooperated() {
		return isCooperated;
	}

	public void setIsCooperated(String isCooperated) {
		this.isCooperated = isCooperated;
	}

	public String getAdvertiserName() {
		return advertiserName;
	}

	public void setAdvertiserName(String advertiserName) {
		this.advertiserName = advertiserName;
	}

	public Integer getAdvertiserNum() {
		return advertiserNum;
	}

	public void setAdvertiserNum(Integer advertiserNum) {
		this.advertiserNum = advertiserNum;
	}

	public Date getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}

	public String getProjectLocation() {
		return projectLocation;
	}

	public void setProjectLocation(String projectLocation) {
		this.projectLocation = projectLocation;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getTotalConsume() {
		return totalConsume;
	}

	public void setTotalConsume(String totalConsume) {
		this.totalConsume = totalConsume;
	}

	public String getTotalContract() {
		return totalContract;
	}

	public void setTotalContract(String totalContract) {
		this.totalContract = totalContract;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("customerId", getCustomerId())
				.append("deptName", getDeptName())
				.append("jobNumber", getJobNumber())
				.append("userName", getUserName())
				.append("industry", getIndustry())
				.append("salesArea", getSalesArea())
				.append("groupName", getGroupName())
				.append("companyName", getCompanyName())
				.append("contactUser", getContactUser())
				.append("contactPhone", getContactPhone())
				.append("isNew", getIsNew())
				.append("isCooperated", getIsCooperated())
				.append("advertiserName", getAdvertiserName())
				.append("advertiserNum", getAdvertiserNum())
				.append("registerDate", getRegisterDate())
				.append("projectLocation", getProjectLocation())
				.append("projectName", getProjectName())
				.append("content", getContent())
				.append("totalConsume", getTotalConsume())
				.append("totalContract", getTotalContract())
				.append("remark", getRemark())
				.append("delFlag", getDelFlag())
				.toString();
	}
}
